#include <iostream>
#include <iomanip>

//https://www.nowcoder.com/practice/ac674f68367149d5ad1f857a379e69c9?tpId=225&tqId=2182324&ru=%2Fpractice%2Fb0423a89826c4d68a3e8b9832a6a1f49&qru=%2Fta%2Fprimary-grammar-cpp%2Fquestion-ranking&sourceUrl=https%3A%2F%2Fwww.nowcoder.com%2Fexam%2Foj

using namespace std;

int main() {
    double h,sum=0 ;
    int n;

    cin >> h;
    cin >> n;
    for (int i = 1; i <= n; i++) {

        sum = sum + h + h / 2.0;
        h = h / 2.0;
    }
    sum = sum - h;
    printf("%.1f %.1f",sum,h);
    return 0;
}


